package com.wgq.entity;

public class Student extends com.wgq.entity.Person {
    public String name;
    public boolean sex;
    public String stu_Num;//学号
    public float math_Score;//数学成绩
    public float english_Score;//英语成绩
    public float chines_Score;//语文成绩
    @Override
    public String getName() { return name; }

    @Override
    public void setName(String name) { this.name = name; }

    @Override
    public boolean isSex() { return sex; }

    @Override
    public void setSex(boolean sex) { this.sex = sex; }

    public String getStu_Num() {
        return stu_Num;
    }

    public void setStu_Num(String stu_Num) {
        this.stu_Num = stu_Num;
    }

    public float getMath_Score() {
        return math_Score;
    }

    public void setMath_Score(float math_Score) {
        this.math_Score = math_Score;
    }

    public float getEnglish_Score() {
        return english_Score;
    }

    public void setEnglish_Score(float english_Score) {
        this.english_Score = english_Score;
    }

    public float getChines_Score() {
        return chines_Score;
    }

    public void setChines_Score(float chines_Score) {
        this.chines_Score = chines_Score;
    }

     void unitTest() {
        Person person= new Person();
        this.name = "张三";
        person.setName("王五");
        person.sex=true;
        person.setAge(12);
        System.out.println("-------person sex = "+person.sex+"---------");
        System.out.println("name:" + this.name);
        System.out.println("person name: "+person.name+"\t person sex : "+((person.sex==true) ? "男" : "女"));
        System.out.println("super="+person.age);
        System.out.println("person="+person.age);

    }
    Student studnetScore(Student stu){
        stu.setName("jack");
        stu.setStu_Num("X2020123");
        stu.setChines_Score(56.1f);
        stu.setEnglish_Score(78.1f);
        stu.setMath_Score(99.1f);
        return stu;
    }

    public static void main(String[] args) {
        Student student = new Student();
        student = student.studnetScore(student);
        System.out.println("stu:"+student.getName()+"\n语文:"+student.getChines_Score()+"\n数学:"
                +student.getMath_Score()+"\n英语:"+student.getEnglish_Score());
        student.unitTest();

    }

}
